package com.github.base.mapper;

import com.github.base.domain.Permission;
import com.github.base.vo.permission.PermissionVO;
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@InterceptorIgnore(illegalSql = "true")
public interface PermissionMapper extends BaseMapper<Permission> {

    /**
     * 获取指定用户id的权限列表
     * @param userId
     * @return
     */
    List<PermissionVO> findPermissionsByUserId(@Param("userId") Long userId);

}
